import { requestSearchList } from '@/api'

const state = {
  searchList: {}
}
const mutations = {
  SET_SEARCHLIST_STATE(state, value) {
    state.searchList = value
  }
}
const actions = {
  async getSearchList({ commit }, params) {
    const re = await requestSearchList(params)
    commit('SET_SEARCHLIST_STATE', re)
  }
}
const getters = {
  attrsList(state){
    return state.searchList.attrsList
  },
  goodsList(state){
    return state.searchList.goodsList
  },
  trademarkList(state){
    return state.searchList.trademarkList
  },

}
export default {
  namespaced: true,
  state,
  mutations,
  actions,
  getters
}